Flash memory devices in a floating-gate transistor configuration are commonly used. However, less and less charges can be stored in a floating gate with continuous scaling down of the devices. This causes fluctuations in threshold voltages of the devices and thus errors. In addition, the floating-gate transistor configuration needs two gate dielectric layers, which impedes further scaling down because the gate dielectric layers has a relatively great thickness in total.